<% if task.done==0 -%>
<% if(task.duedate != nil) -%>
<% if(task.duedate == Date.today) -%>
<div class="duetoday">today !</div>
<% elsif(task.duedate > Date.today and task.duedate <= Date.today+1) -%>
<div class="duetoday">tomorrow!</div>
<% elsif(task.duedate > Date.today and task.duedate <= Date.today+3) -%>
<div class="duenear"><%= time_ago_in_words(task.duedate+1) %></div>
<% elsif(task.duedate > Date.today) -%>
<div class="duefutur"><%= time_ago_in_words(task.duedate+1) %></div>
<% elsif(task.duedate < Date.today) -%>
<div class="duepast"><%= time_ago_in_words(task.duedate) + " ago !" %></div>
<% end -%>
<% end -%>
<% end -%>
